# encoding=utf-8
from run_pandas import get_team_history, get_team_player_salary, get_team_list


class TeamService:

    @staticmethod
    def get_team_list():
        team_list = get_team_list()
        result_data = {
            'team_list': team_list,
            'count': len(team_list)
        }
        return result_data

    @staticmethod
    def get_team_history(team_name):
        history_list = get_team_history(team_name)
        result_data = {
            'history_list': history_list,
            'count': len(history_list)
        }
        return result_data

    @staticmethod
    def get_team_player_salary(team_name):

        player_list = get_team_player_salary(team_name)
        result_data = {
            'player_list': player_list,
            'count': len(player_list)
        }
        return result_data
